﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <PathGeometry x:Key="TreeArrow">
    <PathGeometry.Figures>
      <PathFigureCollection>
        <PathFigure IsFilled="True" StartPoint="0 0" IsClosed="True">
          <PathFigure.Segments>
            <PathSegmentCollection>
              <LineSegment Point="0 6" />
              <LineSegment Point="6 0" />
            </PathSegmentCollection>
          </PathFigure.Segments>
        </PathFigure>
      </PathFigureCollection>
    </PathGeometry.Figures>
  </PathGeometry>

  <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Focusable" Value="False" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Width="16" Height="16" Background="Transparent" Padding="5,5,5,5">
            <Path x:Name="ExpandPath" Fill="Transparent" Stroke="#FF989898"
                  Data="{StaticResource TreeArrow}">
              <Path.RenderTransform>
                <RotateTransform Angle="135" CenterX="3" CenterY="3" />
              </Path.RenderTransform>
            </Path>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="ExpandPath" Property="Stroke" Value="#FF1BBBFA" />
              <Setter TargetName="ExpandPath" Property="Fill" Value="Transparent" />
            </Trigger>

            <Trigger Property="IsChecked" Value="True">
              <Trigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation From="135" To="180" Duration="0:0:0.25"
                                     Storyboard.TargetName="ExpandPath"
                                     Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(RotateTransform.Angle)" />
                  </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimation From="180" To="135" Duration="0:0:0.25"
                                     Storyboard.TargetName="ExpandPath"
                                     Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(RotateTransform.Angle)" />
                  </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>
              <Setter TargetName="ExpandPath" Property="Fill" Value="#FF595959" />
              <Setter TargetName="ExpandPath" Property="Stroke" Value="#FF262626" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <LinearGradientBrush x:Key="MouseOverBackground" StartPoint="0,0" EndPoint="0,1">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#FCFDFE" Offset="0" />
      <GradientStop Color="#F2F7FE" Offset="1" />
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>

  <SolidColorBrush x:Key="MouseOverBorder" Color="#B8D6FB" />

  <LinearGradientBrush x:Key="SelectedBackground" StartPoint="0,0" EndPoint="0,1">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#DCEBFC" Offset="0" />
      <GradientStop Color="#C1DBFC" Offset="1" />
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>

  <SolidColorBrush x:Key="SelectedBorder" Color="#7DA2CE" />

  <SolidColorBrush x:Key="SelectedInnerBorder" Color="#EBF4FD" />

</ResourceDictionary>